{% extends base %}

{% block head %}
    <style type="text/css">
        .item {
            float: left;
            line-height: 25px;
            margin: 3px;
            padding: 3px;
        }

        .logo {
            width: 45px;
            height: 45px;
        }

        .plugin-name {

        }

        .plugin-time {
            float: right;
        }
    </style>
{% end %}


{% block body %}

{% if not show_aside %}
<div class="card">
    <a class="link" href="/plugins_new">新增插件</a>|
    <a class="link" href="/fs_link/scripts/plugins">插件管理</a>|
    <a class="link" href="/fs_api/download/plugins">打包下载</a>

    <div class="float-right">插件数: {{len(plugins)}}</div>
</div>
{% end %}

{% init recent = [] %}
<div class="plugin-list col-md-12">
    {% for link in plugins %}
    <div class="plugin-item">
        <div class="col-md-12">
            <a href="{{link.link}}">{{link.name}}</a>
            {% if _is_admin %}
            <a class="float-right item-option" href="{{link.edit_link}}">编辑</a>
            {% end %}
        </div>
        <div>
            <span>{{link.title}}</span>
            <span class="plugin-time">{{link.atime}}</span>
        </div>
    </div>
    {% end %}
</div>

<script type="text/javascript">
$(function () {
    adjustHeight(".plugin-list", 20);
})
</script>

{% end %}


{% block aside %}
<div class="aside-item">
    <div class="aside-title">
        选项
    </div>
    <div class="aside-content">
        <ul>
            <li><a class="link" href="/plugins_new">新增插件</a></li>
            <li><a href="/fs_link/scripts/plugins" class="link">插件管理</a></li>
            <li><a href="/fs_api/download/plugins" class="link">打包下载</a></li>
        </ul>
    </div>
</div>

<div class="aside-item">
    <div class="aside-title">
        统计
    </div>
    <div class="aside-content">
        <ul>
            <li>插件数: {{len(plugins)}}</li>
        </ul>
    </div>
</div>
{% end %}